<template>
  <div>
    <van-popup :value="value"
               @input="val => this.$emit('input', val)"
               closeable
               close-icon="close"
               close-icon-position="top-left"
               position="bottom"
               :close-on-click-overlay="false"
               :style="{ height: '5.8rem' }">
      <div class="popup-content">
        <li class="popup-title">
          物流信息
        </li>
        <div class="popup-info">
          <span class="info-type">收</span>
          <span class="info-text">姓名 <em>86-8258956</em></span>
          <span class="info-text">地址地址地址地址地址</span>
          <span class="info-type info-type-fa">发</span>
          <span class="info-text">发货物流： 顺丰速递</span>
          <span class="info-text">物流单号：2123456789</span>
        </div>
      </div>
    </van-popup>
  </div>
</template>

<script>
import preventBack from '@/mixins/preventBack'
export default {
  data () {
    return {
    };
  },
  props: {
    value: {
      type: Boolean,
      default: false
    }
  },
  mixins: [preventBack],
  created () { },
  methods: {
    onBrowserBack () {
      // 这里写点击返回键时候的事件
      // 比如判断需求执行back()或者go(-2)或者PopupShow=false隐藏弹框
      if (this.payMethodShow == true) {
        history.pushState(null, null, document.URL)
        this.payMethodShow = false
      }
      else if (this.value == true) {
        history.pushState(null, null, document.URL)
        this.$emit('input', false)
      } else {
        this.$router.go(-1)
      }


    },
  }
}

</script>

<style lang='scss' scoped>
.popup-content {
  @include wh100;
  @include flex-column;
  .popup-title {
    width: 100%;
    height: 1rem;
    line-height: 1rem;
    text-align: center;
    border-bottom: 1px solid #c9c9c9;
    font-size: 0.32rem;
    font-weight: 600;
    color: #000000;
  }
  .popup-info {
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    padding: 0.3rem 0 0.3rem 0.5rem;
    @include flex-column;
    .info-type {
      width: 0.5rem;
      height: 0.5rem;
      line-height: 0.5rem;
      text-align: center;
      background-color: #e85014;
      border-radius: 5rem;
      margin: 0.1rem 0;
      color: #fff;
      font-size: 0.26rem;
    }
    .info-type-fa {
      background-color: #00a0e9;
      margin-top: 0.2rem;
    }
    .info-text {
      margin: 0.15rem 0;
      em {
        color: #666666;
        margin-left: 0.2rem;
      }
    }
  }
}
</style>